-- weak
-- created by wangy
-- 软弱（尸体越多属性绝对值减少）

return {
    apply = function(prop, baseValue)
        return baseValue;
    end,

    -- 每回合触发
    trigger = function(who, prop, base)
        local deno = tonumber(prop[3]);
        assert(deno > 0);

        local count = who.killed_count or 0;
        return math.max(base - count * prop[3], 0);
    end,

    desc = function(prop)
        local deno = tonumber(prop[3]);
        local layer = DungeonM.currentLayer() or 0;

        local addon = math.modf(count * (1 + layer / deno));

        local desc = string.gsub(desc, "{0}", addon);

        return desc;
    end,

    record = function(target, prop, path)
        return false;
    end
};
